//
//  ZDoctorTModel.m
//  DoctorFAQs
//
//  Created by zjq on 17/3/21.
//  Copyright © 2017年 zjq. All rights reserved.
//

#import "ZDoctorTModel.h"

@implementation ZDoctorTModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

- (instancetype)initWithDict:(NSMutableDictionary *)dict {
    self = [super init];
    if (self) {
        NSString * timestr = dict[@"d_time"];
        NSTimeInterval time = [timestr doubleValue];
        NSDate * timeDate = [NSDate dateWithTimeIntervalSince1970:time];
        NSDateFormatter  * dateFormatter = [[NSDateFormatter alloc] init];
        [dateFormatter setDateFormat:@"YYYY-MM-dd hh:mm:ss"];
        NSString *currentDateStr = [dateFormatter stringFromDate: timeDate];
        self.d_time = currentDateStr;
        self.pic =[NSString stringWithFormat:@"%@%@",IconURL,dict[@"pic"]] ;

        [dict removeObjectForKey:@"d_time"];
        [dict removeObjectForKey:@"pic"];
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}
@end
